Tables [dbo].[ContactEducation]
Properties
PropertyValue
Created10:31:17 AM Tuesday, March 02, 2010
Last Modified1:20:14 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ContactEducation: ContactEducationKeyContactEducationKeyuniqueidentifier16
No
Foreign Keys FK_ContactEducation_Individual: [dbo].[Individual].ContactKeyIndexes IX_ContactEducation_ContactKey: ContactKeyContactKeyuniqueidentifier16
No
Foreign Keys FK_ContactEducation_EducationRef: [dbo].[EducationLevelRef].EducationLevelCodeIndexes IX_ContactEducation_EducationLevelCode: EducationLevelCodeEducationLevelCodenvarchar(10)20
No
StartYeardecimal(4,0)5
Yes
Specialtynvarchar(50)100
Yes
Schoolnvarchar(100)200
Yes
UpdatedOndatetime8
No
(getdate())
Foreign Keys FK_ContactEducation_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyIndexes IX_ContactEducation_UpdatedByUserKey: UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
EndYeardecimal(4,0)5
Yes
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_ContactEducation: ContactEducationKeyPK_ContactEducationContactEducationKey
Yes
IX_ContactEducation_ContactKeyContactKey
IX_ContactEducation_EducationLevelCodeEducationLevelCode
IX_ContactEducation_UpdatedByUserKeyUpdatedByUserKey
Foreign Keys Foreign Keys
NameColumns
FK_ContactEducation_EducationRefEducationLevelCode->[dbo].[EducationLevelRef].[EducationLevelCode]
FK_ContactEducation_IndividualContactKey->[dbo].[Individual].[ContactKey]
FK_ContactEducation_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[ContactEducation]
(
[ContactEducationKey] [uniqueidentifier] NOT NULL,
[ContactKey] [uniqueidentifier] NOT NULL,
[EducationLevelCode] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[StartYear] [decimal] (4, 0) NULL,
[Specialty] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[School] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UpdatedOn] [datetime] NOT NULL CONSTRAINT [DF_ContactEducation_UpdatedOn] DEFAULT (getdate()),
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[EndYear] [decimal] (4, 0) NULL,
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[ContactEducation] ADD CONSTRAINT [PK_ContactEducation] PRIMARY KEY CLUSTERED ([ContactEducationKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactEducation_ContactKey] ON [dbo].[ContactEducation] ([ContactKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactEducation_EducationLevelCode] ON [dbo].[ContactEducation] ([EducationLevelCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactEducation_UpdatedByUserKey] ON [dbo].[ContactEducation] ([UpdatedByUserKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ContactEducation] ADD CONSTRAINT [FK_ContactEducation_EducationRef] FOREIGN KEY ([EducationLevelCode]) REFERENCES [dbo].[EducationLevelRef] ([EducationLevelCode])
GO
ALTER TABLE [dbo].[ContactEducation] ADD CONSTRAINT [FK_ContactEducation_Individual] FOREIGN KEY ([ContactKey]) REFERENCES [dbo].[Individual] ([ContactKey])
GO
ALTER TABLE [dbo].[ContactEducation] ADD CONSTRAINT [FK_ContactEducation_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses